package com.ds.lens.flink.monitor.eventsinkjob.function.notify.weixin;

import com.google.gson.JsonObject;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

/**
 * @author Gerald Kou
 * @date 2019-05-22
 * <p>
 */
public interface WeiXinClient {

    @RequestLine("GET /cgi-bin/gettoken?corpid={corpid}&corpsecret={corpsecret}")
    JsonObject getToken(@Param("corpid") String corpid, @Param("corpsecret") String corpsecret);

    @Headers({"Accept: application/json"})
    @RequestLine("POST /cgi-bin/message/send?access_token={access_token}")
    JsonObject sendMsg(@Param("access_token") String access_token, WeiXin weiXin);

}
